import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {Orientation} from "../../seal/enums";

@Component({
  selector: 'app-keyboard',
  templateUrl: './keyboard.component.html',
  styleUrls: ['./keyboard.component.scss']
})
export class KeyboardComponent implements OnInit {
  @Output()
  public keyClick = new EventEmitter<Orientation>()

  constructor() {
  }

  ngOnInit() {
  }

  handleClick(val: String) {
    // @ts-ignore
    let orient = Orientation[val]
    if (orient) {
      this.keyClick.emit(orient)
    }
  }
}
